package org.example.ai04.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.ArrayList;

@Controller
public class PageController {

    @GetMapping("/login")
    public String login() {
        return "login";
    }

    @GetMapping("/register")
    public String register() {
        return "register";
    }

    @GetMapping("/")
    public String index() {
        return "index";
    }

    @GetMapping("/resume")
    public String resumePage(Model model) {
        model.addAttribute("success", false);
        model.addAttribute("resumeData", null);
        model.addAttribute("fileName", "");
        model.addAttribute("analysis", null);
        model.addAttribute("chatMessages", new ArrayList<>());
        return "resume";
    }

    @GetMapping("/admin")
    public String adminPage() {
        return "admin";
    }
}